package com.lagou.edu.common.constant;

/**
 * created by kirito at 2020/7/19
 */
public enum ResponseCode {

    SUCCESS(0, "响应成功"),

    FAIL(-1, "系统错误"),

    USERNAME_OR_PASSWORD_ERROR(100, "用户名或密码错误"),

    TOKEN_IS_INVALIDED(101, "令牌失效，请重新登录"),

    REPEAT_REGISTRY_ERROR(102, "邮箱已注册"),


    AUTHCODE_IS_ERROR(103, "验证码错误"),

    AUTHCODE_IS_TIMEOUT(104, "验证码超时"),
    ;


    private int code;

    private String message;

    ResponseCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
